<!--

/**
* editSysIdentificationAdvanced.html, T1000 template for editing the email and locations section of the system identification record
* defining email server and addresses for incoming and outgoing mail
*
* @package     Heurist academic knowledge management system
* @link        http://HeuristNetwork.org
* @copyright   (C) 2005-2014 University of Sydney
* @author      Tom Murtagh
* @author      Ian Johnson     <ian.johnson@sydney.edu.au>
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @version     3.2
*/

/*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.txt
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied
* See the License for the specific language governing permissions and limitations under the License.
*/
-->

<html>
    <head>
        <title>Database Advanced Properties</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="../../../common/css/global.css">
        <link rel="stylesheet" type="text/css" href="../../../common/css/edit.css">
        <link rel="stylesheet" type="text/css" href="../../../common/css/admin.css">
    </head>

    <body class="popup" onload="showMessage()">
        <script type="text/javascript" src="../../../common/js/utilsLoad.js"></script>
        <script type="text/javascript" src="../../../common/js/utilsUI.js"></script>
        <script>
            // quite weird way - since it is not possibel (or unknown) how to treat t1000 in case of error
            function showMessage(){
                var is_processed = top.HEURIST.util.getUrlParameter('was', this.location.search);
                if(document.getElementById('divErrors').innerHTML=="" && is_processed){
                    top.HEURIST.util.popupTinyElement(this, document.getElementById('divMessage'));
                    setTimeout(function(){
                        top.HEURIST.util.closePopupLast();
                        }, 500);
                }

                if([popup!]=='1' || [popup!]=='2'){
                    document.getElementById('headertitle').style.display = "none";
                    document.getElementById('btnBackToImport').style.visibility = "visible";
                }

            }

            function backToImport() {
                if([popup!]=='1'){
                    window.location.href = '../../../import/fieldhelper/synchroniseWithFieldHelper.php';
                }else{
                    window.location.href = '../../../import/email/emailProcessingSetup.php';
                }
            }
        </script>

        <div id="headertitle" class="banner"><h2>Database Advanced Properties</h2></div>

        <!--{PageHeader} -->

        <div id="page-inner">

            <div id="divErrors">[errors]</div>


            [foreach SYSID sys]

            <form action="editSysIdentificationAdvanced.php?was=1&amp;db=[dbname!]&amp;popup=[popup!]" method="post">

                [update SYSID sysid_update]

                <div class="input-row">
                    <div class="input-header-cell">Heurist registration number and format version (0 = not registered)
                    </div>
                    <div class="input-cell"><br />Database Registration number <b>[sys_dbRegisteredID]</b>&nbsp;&nbsp;&nbsp;
                        Database format version <b>[sys_dbVersion].[sys_dbSubVersion].[sys_dbSubSubVersion]</b>
                    </div>
                </div>

                <h3>Incoming / outgoing email</h3>
                <div class="input-row">
                    <div class="input-header-cell">IMAP server for server receiving emails which can be harvested
                    </div>
                    <div class="input-cell">[textbox : sys_eMailImapServer : : size=30]
                        Port [textbox : sys_eMailImapPort : : size=4] Protocol [textbox : sys_eMailImapProtocol : : size=10]
                    </div>
                </div>
                <div class="input-row">
                    <div class="input-header-cell">IMAP user name / password for incoming mail
                    </div>
                    <div class="input-cell">[textbox : sys_eMailImapUsername : : size=30] / [textbox : sys_eMailImapPassword : : size=30]
                    </div>
                </div>
                <div class="input-row">
                    <div class="input-header-cell">Addresses from which incoming mail to be harvested may be received
                    </div>
                    <div class="input-cell">[textbox : sys_IncomingEmailAddresses : : size=100] <br />
                        comma separated, shared list, additional addresses can be added in personal profile, other addresses are ignored
                    </div>
                </div>
                <div class="input-row">
                    <div class="input-header-cell">Potential email addresses to which database records may be sent
                    </div>
                    <div class="input-cell">[textbox : sys_TargetEmailAddresses : : size=100]
                        <br />comma separated, shared list, will appear for every user, additional addresses can be added in personal profile
                        <br/>(function not yet implemented)
                    </div>
                </div>

                <h3>Locations</h3>

                <!--
                <div class="input-row">
                <div class="input-header-cell">Database containing the user authentication table (sysUGrps) </div>
                <div class="input-cell">[textbox : sys_UGrpsDatabase : : size=30] blank = current database</div>
                </div>

                -->

                <div class="input-row">
                    <div class="input-header-cell">Zotero web library key(s) and IDs for synchronisation</div>
                    <div class="input-cell">[textbox : sys_SyncDefsWithDB : : size=160] <br />
                        enter as Title,UserID,GroupID,Key, separated by |
                        eg. Artem's library,1958388,268611,YjUxZzcgq1fhCd9YyxgzzVNX | Ian's library,1836383,274864,DuFHBTyVYVhuIhttUotyqBSjb
                    </div>
                </div>

                <div class="input-row">
                    <div class="input-header-cell">File extensions to index</div>
                    <div class="input-cell">[textbox : sys_MediaExtensions : : size=160] <br />comma separated list
                    </div>
                </div>

                <div class="input-row">
                    <div class="input-header-cell">Additional folder(s) containing files for indexing (Picasa/FieldHelper compatibility)
                    </div>
                    <div class="input-cell">[textbox : sys_MediaFolders : : size=160] <br />
                        separated by semi-colon ( ; ), child folders are included automatically</div>
                </div>

                <div class="input-row">
                    <div class="input-header-cell">Directory in which to write HTML representation of published records
                    </div>
                    <div class="input-cell">[textbox : sys_htmlOutputDirectory : : size=100] <br />blank = default directory (preferred) or specify full path
                    </div>
                </div>

                <div class="input-row">
                    <div class="input-header-cell">Directory in which to write HML representation of published records
                    </div>
                    <div class="input-cell">[textbox : sys_hmlOutputDirectory : : size=100]  <br />blank = default directory (preferred) or specify full path
                    </div>
                </div>


                <!-- None of this seems to be referenced anywhere else in the code, I long since forgot what this was even meant to do ...-->
                <div class="input-row" style="visibility:hidden">
                    <div class="input-header-cell">Default constraints behaviour (advanced)  </div>
                    <div class="input-cell">[dropdown : sys_ConstraintDefaultBehavior : : enum("locktypetotype", "unconstrainedbydefault", "allownullwildcards")]
                        If in doubt, leave as 'locktypetotype'</div>
                </div>

                [end-update]


                <p><span class="red">[errors]</span></p>

                <input type="submit" value="save" />

                <input type="button" id="btnBackToImport" style="visibility: hidden;" value="Back to import"
                    onclick="{setTimeout(backToImport, 0);}"
                    />

            </form>

            [end-foreach]

        </div>

        <div id="divMessage" style="display:none;width:180px;height:80px;text-align: center; ">
            <div id="divMessage-text" style="color:black;font-weight:bold;margin:10px;">Advanced Properties saved
            </div>
        </div>

    </body>
</html>



